<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>
    problem with synchronization my Mysql database and application : Forums : PythonAnywhere
</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="Forums : PythonAnywhere">
        <meta name="author" content="PythonAnywhere LLP">
        <meta name="google-site-verification" content="O4UxDrfcHjC44jybs2vajc1GgRkTKCTRgVzeV6I9V14" />

        <!-- Le styles -->
        <link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet">
        <link href="/static/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
        <link href="/static/anywhere/styles/bootstrap_base.css" rel="stylesheet">
        
    
    <link rel="stylesheet" href="/static/anywhere/styles/forums.css" type="text/css" media="screen" charset="utf-8" />

    <link rel="stylesheet" href="/static/pygments/style.css" type="text/css" media="screen" charset="utf-8" />

        <link rel="stylesheet" href="/static/jquery/jquery-ui-1.8.11.custom.css" type="text/css" media="screen" charset="utf-8" />
        
    
    <link rel="alternate" type="application/rss+xml" title="RSS" href="/forums/topic/821/rss" />

        <style type="text/css">
            body {
                height: auto;
            }
        </style>
        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
        <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->

        <!-- Le fav and touch icons -->
        <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
        <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
        <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
    </head>

     <body>
        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div id="id_internal_nav_bar_container" class="container">
                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    </a>
                    <a class="brand" href="/"><img id="id_logo" src="/static/anywhere/images/logo-234x35.png" height="35" title="PythonAnywhere logo" alt="PythonAnywhere logo" /></a>
                    <div class="nav-collapse">
                        <ul id="id_header_links" class="nav">
                            <li><a id="id_feedback_link" class='feedback_link' href="">Send feedback</a></li>
                            <li><a id="id_forums_link" href="/forums/">Forums</a></li>
                            <li><a href="/wiki/" id="id_help_link">Help</a></li>
                            <li><a href="http://blog.pythonanywhere.com/" id="id_blog_link">Blog</a></li>
                            
                            
                                <li><a style="font-weight: bold;" href="/pricing/" id="id_pricing_link">Pricing & signup</a></li>
                                <li><a href="/login/?next=/forums/topic/821/" id="id_login_link">Log in</a></li>
                            
                        </ul>
                    </div>
                </div>
            </div>
        </div>

        <div class="top-container" id="id_dummy"></div>

        

        
    
    <div class="container">
        <div class="row">
            <div class="span8 offset3">
                <h1>PythonAnywhere Forums</h1>
            </div>
        </div>



    <div class="row">
        <div class="span8 offset3">
            <p>
                <a href="/forums/start_topic/" id="id_start_new_topic">Start a new topic</a> |
                <a href="/forums/">Back to all topics</a> |
                <a href="/forums/topic/821/rss">This topic's RSS</a>
            </p>
        </div>
    </div>
    <div class="row">
        <div class="span8 offset3 topic">
            <h2>problem with synchronization my Mysql database and application</h2>
        </div>
    </div>

    
        <div class="row">
            <div id="id_post_5801" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5801_content_text" class="span8">
                        <p>Hi, I have a problem with synchronization my Mysql database and  application.
When I run python manage.py syncdb 
I have a mistake:</p>
<p>ValueError: Unable to configure filter 'require_debug_false': Cannot resolve 'django.utils.log.RequireDebugFalse': No module named RequireDebugFalse</p>
<p>I now that module  MySQLdb –is a standart “battery” 
In a python shell all ok:</p>
<div class="codehilite"><pre><span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">MySQLdb</span>                                                                                                  
<span class="o">&gt;&gt;&gt;</span> <span class="n">MySQLdb</span><span class="o">.</span><span class="n">version_info</span>                                                                                            
<span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="s">&#39;final&#39;</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
</pre></div>


<p>A part of settings.py file:</p>
<div class="codehilite"><pre><span class="n">DATABASES</span> <span class="o">=</span> <span class="p">{</span>
    <span class="s">&#39;default&#39;</span><span class="p">:</span> <span class="p">{</span>
        <span class="s">&#39;ENGINE&#39;</span><span class="p">:</span> <span class="s">&#39;django.db.backends.mysql&#39;</span><span class="p">,</span>     
        <span class="s">&#39;NAME&#39;</span><span class="p">:</span> <span class="s">&#39;archeology$default&#39;</span><span class="p">,</span>                      
        <span class="s">&#39;USER&#39;</span><span class="p">:</span> <span class="s">&#39;archeology&#39;</span><span class="p">,</span>
        <span class="s">&#39;PASSWORD&#39;</span><span class="p">:</span> <span class="s">&#39;my-pass&#39;</span><span class="p">,</span>
        <span class="s">&#39;HOST&#39;</span><span class="p">:</span> <span class="s">&#39;mysql.server&#39;</span><span class="p">,</span>               
        <span class="s">&#39;PORT&#39;</span><span class="p">:</span> <span class="s">&#39;&#39;</span><span class="p">,</span>                      
    <span class="p">}</span>
<span class="p">}</span>
</pre></div>


<p>Thanks
P.S. sorry for my English)))</p>
<p>[edited by admin for readability]</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5801_creator_details">
                            
                                
                            
                            archeology
                            |
                            13
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5801_created_date">
                            Aug. 7, 2013, 12:18 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5801">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5808" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5808_content_text" class="span8">
                        <p>Which version of Django did you create your application for?  We have Django 1.3.7 installed by default, and I think that error normally happens when you have an app sett up for a later version.  </p>
<p>It looks like you're using a virtualenv -- if so, and you haven't installed your preferred version of Django into the virtualenv yet, then you may be able to fix the problem by installing it.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5808_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            giles
                            |
                            866
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5808_created_date">
                            Aug. 7, 2013, 12:57 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5808">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5809" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5809_content_text" class="span8">
                        <p>How  can i do this.</p>
<p>Something like this:</p>
<p>virtualenv env</p>
<p>source env/bin/activate</p>
<p>pip install django 1.5.1</p>
<p>or I have download and install this version of  django</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5809_creator_details">
                            
                                
                            
                            archeology
                            |
                            13
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5809_created_date">
                            Aug. 7, 2013, 1:16 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5809">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5810" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5810_content_text" class="span8">
                        <p>this variant is not work</p>
<p>13:36 ~ $ virtualenv env    </p>
<p>New python executable in env/bin/python2.7</p>
<p>Not overwriting existing python script env/bin/python (you must use env/bin/python2.7)</p>
<p>Installing setuptools.............done.</p>
<p>Installing pip...............done.</p>
<p>13:37 ~ $ source env/bin/activate</p>
<p>(env)13:37 ~ $ pip install django 1.5.1</p>
<p>Requirement already satisfied (use --upgrade to upgrade): django in ./env/lib/python2.7/site-packages</p>
<p>Downloading/unpacking 1.5.1</p>
<p>Could not find any downloads that satisfy the requirement 1.5.1</p>
<p>No distributions at all found for 1.5.1</p>
<p>Storing complete log in /home/archeology/.pip/pip.log</p>
<p>(env)13:37 ~ $ </p>
<hr />
<p>In which directory must be placed a new version of Django? </p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5810_creator_details">
                            
                                
                            
                            archeology
                            |
                            13
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5810_created_date">
                            Aug. 7, 2013, 1:46 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5810">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5811" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5811_content_text" class="span8">
                        <p>You need to use <code>pip install django==1.5.1</code> to install a specific version; putting a space between the package and the version makes pip interpret it as two different packages, one called <code>django</code> and one called <code>1.5.1</code>.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5811_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            giles
                            |
                            866
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5811_created_date">
                            Aug. 7, 2013, 2:40 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5811">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5813" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5813_content_text" class="span8">
                        <p>In env I successful installed new version Django (1.5.1) (Thanks))))
 but when I try to install MySQL-python
I have a mistake: </p>
<p>EnvironmentError: mysql_config not found</p>
<p>Command python setup.py egg_info failed with error code 1 in /home/archeology/env/build/MySQL-python</p>
<hr />
<p>when I try to install PIL</p>
<p>I have a mistake: </p>
<p>error: command 'x86_64-linux-gnu-gcc' failed with exit status 1</p>
<p>but in  the directory:  home &gt; archeology &gt; env &gt; build</p>
<p>I see this 2 modules: </p>
<p>MySQL-python/</p>
<p>PIL/</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5813_creator_details">
                            
                                
                            
                            archeology
                            |
                            13
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5813_created_date">
                            Aug. 7, 2013, 6:38 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5813">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5816" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5816_content_text" class="span8">
                        <p>Hi archeology! </p>
<p>We have a fix in place for this and I've patched live with it. However it is going to require me to kill all your processes and effectively "reboot" your account. Can you let me know, either via email (support@pythonanywhere.com) or here, when you are ready for me to do that? I should add that this won't change the contents of the account. Just the running processes. </p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5816_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            hansel
                            |
                            435
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5816_created_date">
                            Aug. 8, 2013, 10:58 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5816">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5817" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5817_content_text" class="span8">
                        <p>It's a new account and I have all files on my PC 
You may to reboot my account.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5817_creator_details">
                            
                                
                            
                            archeology
                            |
                            13
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5817_created_date">
                            Aug. 8, 2013, 11:19 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5817">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5819" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5819_content_text" class="span8">
                        <p>Great, that's all done. If you enter your virtualenv again and run </p>
<div class="codehilite"><pre><span class="n">pip</span> <span class="n">install</span> <span class="o">--</span><span class="n">upgrade</span> <span class="n">mysql</span><span class="o">-</span><span class="n">python</span>
</pre></div>


<p>It should successfully install this time. </p>
<p>The eagle eyed amongst you might notice that there is a c compiler (gcc 4.7) available now... This helps when you are trying to build cPython packages that require some compilation inside your virtualenv :)</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5819_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            hansel
                            |
                            435
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5819_created_date">
                            Aug. 8, 2013, 11:34 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5819">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5822" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5822_content_text" class="span8">
                        <p>Successfully installed PIL</p>
<p>Successfully installed mysql-python</p>
<p>Thanks )))))</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5822_creator_details">
                            
                                
                            
                            archeology
                            |
                            13
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5822_created_date">
                            Aug. 8, 2013, 5:13 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5822">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5823" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5823_content_text" class="span8">
                        <p>AWESOME! Good work archeology. </p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5823_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            hansel
                            |
                            435
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5823_created_date">
                            Aug. 8, 2013, 5:25 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5823">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5825" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5825_content_text" class="span8">
                        <p>I successful synchronizated  Mysql database and  application</p>
<p>and now I can get in the admin panel(http://archeology.pythonanywhere.com/admin/)</p>
<p>but when I try to see    http://archeology.pythonanywhere.com/ </p>
<p>I have a mistake: Server Error (500)</p>
<hr />
<p>In archeology.pythonanywhere.com.error.log :</p>
<p>TemplateDoesNotExist: start.html</p>
<p>but this file (start.html) exists on the server</p>
<p>( / &gt; home &gt; archeology &gt; mysite &gt; mysite &gt; templates &gt; start.html)</p>
<p>P. S.  I run” reload archeology.pythonanywhere.com"</p>
<p>on dev server ( on my local PC) all works</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5825_creator_details">
                            
                                
                            
                            archeology
                            |
                            13
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5825_created_date">
                            Aug. 8, 2013, 5:53 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5825">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5830" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5830_content_text" class="span8">
                        <p>Check your <code>TEMPLATE_DIRS</code> entry in settings.py?</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5830_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            harry
                            |
                            376
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5830_created_date">
                            Aug. 9, 2013, 11:34 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5830">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5845" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5845_content_text" class="span8">
                        <p>Thank you very much for your help))</p>
<p>I had a bug in TEMPLATE_DIRS</p>
<p>One more question:</p>
<p>How can I install the Django application, which does not have a standard set( in  “ batteries “)?</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5845_creator_details">
                            
                                
                            
                            archeology
                            |
                            13
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5845_created_date">
                            Aug. 10, 2013, 4:34 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5845">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5846" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5846_content_text" class="span8">
                        <p>I'm not sure I understand the question, but if you're talking about installng a new python package which isn't on our list of batteries included modules, take a look at the help text on the wiki, under "Useful python modules":</p>
<p><a href="https://www.pythonanywhere.com/wiki">https://www.pythonanywhere.com/wiki</a></p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5846_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            harry
                            |
                            376
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5846_created_date">
                            Aug. 10, 2013, 6:20 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5846">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5885" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5885_content_text" class="span8">
                        <p>Thank you for your answer.</p>
<p>But now I have  problem with my MySQL DataBase.</p>
<p>Content on my site in Ukrainian.</p>
<p>This content is entered via a form on the website
  and saved in a database (MySQL).</p>
<p>But when this content is displayed on the page from the database,
it is not displayed normally  </p>
<p>( like in this place:http://archeology.pythonanywhere.com/archaeologist/pub/7/ )</p>
<p>I think, it's a problem with the encoding (utf-8) in the database.</p>
<p>What can I do with this problem.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5885_creator_details">
                            
                                
                            
                            archeology
                            |
                            13
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5885_created_date">
                            Aug. 13, 2013, 11:37 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5885">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5894" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5894_content_text" class="span8">
                        <p>Something is certainly mangling the conversion... Where in your stack that is happening is not clear. You'll have to debug at what point it is destructively converted. </p>
<p>Whatever encoding you are uploading into your form you need to convert it to UTF-8 before you save it to the database. </p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5894_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            hansel
                            |
                            435
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5894_created_date">
                            Aug. 13, 2013, 5:54 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5894">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5895" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5895_content_text" class="span8">
                        <p>Something is certainly mangling the conversion... Where in your stack that is happening is not clear. You'll have to debug at what point it is destructively converted. </p>
<p>Whatever encoding you are uploading into your form you need to convert it to UTF-8 before you save it to the database. </p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5895_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            hansel
                            |
                            435
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5895_created_date">
                            Aug. 13, 2013, 5:54 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5895">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5897" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5897_content_text" class="span8">
                        <p>I looked, some system variables in MySQL (on your hosting) is not in utf8:</p>
<p>collation_database  latin1_swedish_ci</p>
<p>collation_server      latin1_swedish_ci</p>
<p>character_set_database   latin1</p>
<p>character_set_server        latin1</p>
<hr />
<p>But in my project they are ( MySQL  server on my local PC):</p>
<p>collation_database   utf8_general_ci </p>
<p>collation_server        utf8_general_ci</p>
<p>character_set_database     utf8</p>
<p>character_set_server          utf8    </p>
<hr />
<p>I tried to change this settings (in your console), but  got the error:</p>
<p>mysql&gt; SET GLOBAL collation_database=utf8_unicode_ci;    </p>
<p>ERROR 1227 (42000): Access denied; you need the SUPER privilege for this operation                                             </p>
<p>Do you help me in this question<br />
P S My project only works with these settings (I checked) because I'm using not only the Latin alphabet</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5897_creator_details">
                            
                                
                            
                            archeology
                            |
                            13
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5897_created_date">
                            Aug. 13, 2013, 8:14 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5897">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5903" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5903_content_text" class="span8">
                        <p>Swedish? that's weird.  We've fixed it so that new databases will get the right setting.</p>
<p>If you want to change your existing database, just issue commands without the <code>GLOBAL</code>, eg:</p>
<div class="codehilite"><pre><span class="kt">SET</span> <span class="n">character_set_database</span><span class="o">=</span><span class="n">utf8</span><span class="p">;</span>
<span class="k">SHOW</span> <span class="n">VARIABLES</span> <span class="k">LIKE</span> <span class="s1">&#39;character%&#39;</span><span class="p">;</span> 
<span class="k">SHOW</span> <span class="n">VARIABLES</span> <span class="k">LIKE</span> <span class="s1">&#39;collation%&#39;</span><span class="p">;</span>
</pre></div>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5903_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            harry
                            |
                            376
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5903_created_date">
                            Aug. 14, 2013, 2:39 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5903">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5908" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5908_content_text" class="span8">
                        <p>not Swedish ------Ukrainian ))) <br />
(in Ukrainian language uses Cyrillic letters)</p>
<p>You have changed the settings but not all</p>
<p>I finished.</p>
<p>But the letters are all the same not normally displayed.</p>
<p>( http://archeology.pythonanywhere.com/archaeologist/pub/8/ )</p>
<p>Try to reboot my MySQL  server, please.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5908_creator_details">
                            
                                
                            
                            archeology
                            |
                            13
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5908_created_date">
                            Aug. 14, 2013, 4:56 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5908">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5913" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5913_content_text" class="span8">
                        <p>Re the Swedish thing, I think Harry was confused that we had values like this:</p>
<div class="codehilite"><pre><span class="n">collation_database</span> <span class="n">latin1_swedish_ci</span>
<span class="n">collation_server</span> <span class="n">latin1_swedish_ci</span>
</pre></div>


<p>...but I think that that is just because it's the MySQL default.</p>
<p>I also think that the commands he suggested above won't help.  What I think you need to do is this (changing <code>databasename</code> to the name of your database, of course):</p>
<div class="codehilite"><pre><span class="n">ALTER</span> <span class="n">DATABASE</span> <span class="n">databasename</span> <span class="n">CHARACTER</span> <span class="n">SET</span> <span class="n">utf8</span> <span class="n">COLLATE</span> <span class="n">utf8_general_ci</span><span class="p">;</span>
</pre></div>


<p>Then, for each of your tables:</p>
<div class="codehilite"><pre><span class="n">ALTER</span> <span class="n">TABLE</span> <span class="n">tablename</span> <span class="n">CHARACTER</span> <span class="n">SET</span> <span class="n">utf8</span> <span class="n">COLLATE</span> <span class="n">utf8_general_ci</span><span class="p">;</span>
</pre></div>


<p>Try that, and let us know if it helps.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5913_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            giles
                            |
                            866
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5913_created_date">
                            Aug. 15, 2013, 11:43 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5913">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5915" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5915_content_text" class="span8">
                        <p>I read in the documentation that it is better to change  the  MySQL server settings
before create the database</p>
<p>I deleted the old database</p>
<p>checked the MySQL settings</p>
<p>created a new database</p>
<p>successfully synchronized it with my project</p>
<p>Now when I go to the admin panel of the site -
I see that the CSS settings do not work
.
(Http://archeology.pythonanywhere.com/admin/)</p>
<p>Nothing but the action with the database I did not do (the files have not changed)</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5915_creator_details">
                            
                                
                            
                            archeology
                            |
                            13
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5915_created_date">
                            Aug. 15, 2013, 12:50 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5915">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5916" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5916_content_text" class="span8">
                        <p>The admin UI seems to be looking for its CSS files in <code>/assets/</code>, but in your static file configuration you have it set up to be served from <code>/static/admin</code> -- assets seems to be just your own CSS files.</p>
<p>I think you want to set <code>ADMIN_MEDIA_PREFIX</code> to <code>/static/admin</code> in your <code>settings.py</code>.  You'll need to reload the web app to make it take effect.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5916_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            giles
                            |
                            866
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5916_created_date">
                            Aug. 15, 2013, 2:25 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5916">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5918" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5918_content_text" class="span8">
                        <p>now in settings.py</p>
<p>ADMIN_MEDIA_PREFIX ='/static/admin/'</p>
<p>but it did not work:</p>
<p>http://archeology.pythonanywhere.com/admin/</p>
<p>P.S.  I reloaded the web app</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5918_creator_details">
                            
                                
                            
                            archeology
                            |
                            13
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5918_created_date">
                            Aug. 15, 2013, 6:02 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5918">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5928" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5928_content_text" class="span8">
                        <p>ADMIN_MEDIA_PREFIX is deprecated in Django 1.5. You can probably create a static file entry for your web app that points from /assets/admin to the directory in your virtualenv that holds the admin media (the path would end with django/contrib/admin/media)</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5928_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            glenn
                            |
                            418
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5928_created_date">
                            Aug. 16, 2013, 11:42 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/821/#id_post_5928">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    

    




        <div id="id_footer" class="container">

            <footer id="id_copyright_div">
                <p>
                    Copyright &copy; 2013 PythonAnywhere LLP
                    &mdash;
                    <a href="/terms/">Terms</a>
                    &mdash;
                    <a href="/privacy/">Privacy</a><br/>
                    "Python" is a registered trademark of the Python Software Foundation.
                </p>
            </footer>

        </div>

        
        

        <div id="id_feedback_dialog" title="Help us improve" style="display:none">
    <div id="id_feedback_dialog_blurb_big" class="dialog_blurb_big">
        It's always a pleasure to hear from you!
    </div>
    <div id="id_feedback_dialog_blurb_small">
        Ask us a question, or tell us what you love or hate about PythonAnywhere.<br/>
        We'll get back to you over email ASAP.
    </div>
    <textarea id="id_feedback_dialog_text" rows="6"></textarea>
    <input id="id_feedback_dialog_email_address" type="text" class="default_prompt"/>
    <div id="id_feedback_dialog_error" class="pa_hidden">
        Sorry, there was an error connecting to the server. <br/>Please try again in a few moments...
    </div>
    <div class="dialog_buttons">
        <img id="id_feedback_dialog_spinner" src="/static/anywhere/images/spinner-small.gif" />
        <button class="btn btn-primary" id="id_feedback_dialog_ok_button">OK</button>
        <button class="btn" id="id_feedback_dialog_cancel_button">Cancel</button>
    </div>
</div>


        <!-- Le javascript
        ================================================== -->
        <!-- Placed at the end of the document so the pages load faster -->
        <script type="text/javascript" src="/static/jquery/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="/static/jquery/jquery-ui-1.8.11.custom.min.js"></script>
        <script src="/static/bootstrap/js/bootstrap-transition.js"></script>
        <script src="/static/bootstrap/js/bootstrap-alert.js"></script>
        <script src="/static/bootstrap/js/bootstrap-modal.js"></script>
        <script src="/static/bootstrap/js/bootstrap-dropdown.js"></script>
        <script src="/static/bootstrap/js/bootstrap-scrollspy.js"></script>
        <script src="/static/bootstrap/js/bootstrap-tab.js"></script>
        <script src="/static/bootstrap/js/bootstrap-tooltip.js"></script>
        <script src="/static/bootstrap/js/bootstrap-popover.js"></script>
        <script src="/static/bootstrap/js/bootstrap-button.js"></script>
        <script src="/static/bootstrap/js/bootstrap-collapse.js"></script>
        <script src="/static/bootstrap/js/bootstrap-carousel.js"></script>
        <script src="/static/bootstrap/js/bootstrap-typeahead.js"></script>

        <script type="text/javascript">
            var urls = {};
            var Anywhere = {};
            Anywhere.urls = {};
        </script>
        <script type="text/javascript" src="/static/anywhere/scripts/ajax_utils.js"></script>

        <script type="text/javascript" src="/static/anywhere/scripts/feedback_dialog.js"></script>
        
        <script type="text/javascript">
            $(function() {
                $.extend(
                    urls,
                    {
                        feedback: '/feedback/submit/'
                    }
                );
                
                    Anywhere.FeedbackDialog.Initialise(urls, true);
                
            });
        </script>

        <script type="text/javascript">

            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', 'UA-18014859-6']);
            _gaq.push(['_trackPageview']);

            (function() {
                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
            })();

        </script>

        



    </body>
</html>
